<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- <html style="background-color:rgba(193, 247, 176, 0.466)">
 -->
 <html>
   <head>
    <base href="<%=basePath%>">
    
    <title>商城</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->	<link href="<%=request.getContextPath() %>/resources/img/tea.png" rel="icon">
	<link href="<%=request.getContextPath() %>/resources/css/teashopping.css" rel="stylesheet">
		<%-- <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/chatTea.css"> --%>
	    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/bootstrap/css/bootstrap.min.css">
	    <script src="<%=request.getContextPath() %>/resources/jquery/jquery-1.11.3.min.js"></script>
		<script src="<%=request.getContextPath() %>/resources/bootstrap/js/bootstrap.min.js"></script>
	 	<script type="text/javascript" src="https://unpkg.com/wangeditor/release/wangEditor.min.js"></script>
		<script src="<%=request.getContextPath() %>/resources/js/teashopping.js"></script>		
			
  </head>
 <body style="background-image: linear-gradient(to top, #fff,#30A12B); height:965px;">
 
 <div class="container-fluid">
<input id="usersequence" type="text" value='<%=session.getAttribute("usersequence") %>' hidden>
<input id="nickname" type="text" value='<%=session.getAttribute("nickname") %>' hidden>

	<jsp:include page="/WEB-INF/jsp/menu.jsp" />
	<!--  <form class="navbar-form navbar-left">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="茶叶种类" id="teaText" >
        </div>
        <button type="button" onclick="query()" class="btn btn-info" style="border-radius:20px;">查询</button>
      </form><br> -->
	<div class="row ">
	<c:choose>
	<c:when test="${not empty list }">
			<c:forEach items="${list }" var="lis" varStatus="vs">
			  <div class="col-md-3 buy_border" ;">
			  	<div>${lis.img}</div>
			  	<div>
			  		${lis.teaname}&nbsp;&nbsp;&nbsp;<small>${lis.createtime}</small>
			  		<a href="${lis.url}">购买</a>&nbsp;&nbsp;&nbsp;
			  		<input class="btn btn-warning" type="button" value="加入购物车" onclick="addToSelfcart(${lis.teaId})">&nbsp;&nbsp;&nbsp;
			  		<input class="btn btn-info" type="button" value="详情" onclick="querydetail(${lis.teaId})">&nbsp;&nbsp;&nbsp;
			  		
			  		
			  	</div>
			  </div>
			</c:forEach>
		</c:when>
	</c:choose>
</div>
</div>
  </body>
  
</html>
